<?php
namespace Cal\Client;

use Grpc\BaseStub;
use Cal\CalRequest;

/**
 *
 * @time 2022-7-25
 * @uthor 王恒兵
 */

class Client extends BaseStub {
    public function __construct($hostname, $opts, $channel = null) {
        parent::__construct($hostname, $opts, $channel);
    }

    public function Add(CalRequest $argument, $metadata = [], $options = []): \Grpc\UnaryCall {
        return $this->_simpleRequest('/Cal.Cal/Add',
            $argument,
            ['\Cal\CalReply', 'decode'],
            $metadata, $options);
    }

    public function Sub(CalRequest $argument, $metadata = [], $options = []): \Grpc\UnaryCall {
        return $this->_simpleRequest('/Cal.Cal/Sub',
            $argument,
            ['\Cal\CalReply', 'decode'],
            $metadata, $options);
    }
}
